# 位置参数

def user_info(name,age,gender):
    print(f"姓名：{name},年龄：{age},性别：{gender}")

user_info('tom',10,'男')

# 关键字参数

def user_info(name,age,gender):
    print(f"姓名：{name},年龄：{age},性别：{gender}")

user_info('alis',age=18,gender='女')

# 缺省参数

def user_info(name,age,gender='女'):
    print(f"姓名：{name},年龄：{age},性别：{gender}")

user_info('alis',age=18,gender='女')
user_info('alis',age=18)


#不定长参数_位置传递
def user_info(*args):
    print(f"类型是{type(args)},值为:{args}")

user_info(18,17,16,18)


#不定长参数_关键字传递
def user_info(**kwargs):
    print(f"类型是{type(keyword)},值为:{keyword}")

user_info(a1=1,a2=2,a3=3)

def test_func(compute):
    result = compute(0,2)
    print(result)

